package com.qhong;

import com.qhong.event.MyApplicationEnvironmentPreparedEventListener;
import com.qhong.event.MyApplicationFailedEventListener;
import com.qhong.event.MyApplicationPreparedEventListener;
import com.qhong.event.MyApplicationStartedEventListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@SpringBootApplication
public class SpringBootDemoApplication  {
	public static void main(String[] args) {
//
//	    ApplicationContext ctx=	SpringApplication.run(SpringBootDemoApplication.class, args);
//
//
//		ActionMethod actionMethod=SpringUtils.getBean(ActionMethod.class);
//        actionMethod.action();

		SpringApplication app = new SpringApplication(SpringBootDemoApplication.class);
		app.addListeners(new MyApplicationStartedEventListener());
		app.addListeners(new MyApplicationEnvironmentPreparedEventListener());
		app.addListeners(new MyApplicationPreparedEventListener());
		app.addListeners(new MyApplicationFailedEventListener());
		app.run(args);
	}
}
